package com.corgi.dubbo.consumer.controller;

import com.corgi.dubbo.api.bean.UserAddress;
import com.corgi.dubbo.api.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @title: OrderController
 * @description:
 * @author: dengmiao
 * @create: 2019-09-24 16:04
 **/
@RestController
public class OrderController {

	@Autowired
	private OrderService orderService;

	@GetMapping("initOrder")
	public List<UserAddress> initOrder(@RequestParam("userId") String userId) {
		return orderService.initOrder(userId);
	}
}
